package kjx_test_security.controller;

import kjx_test_security.auth.LoginService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.tomcat.util.net.openssl.ciphers.Authentication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Objects;

/**
 * TODO
 *
 * @Author 康1919
 * @Date 2024/7/20 15:51
 */
@Slf4j
@RestController
@RequestMapping("/login")
@AllArgsConstructor
public class LoginController {
    @Autowired
    LoginService loginService;
    @RequestMapping("/doLogin")
    //@PreAuthorize("hasAnyAuthority('admin','test','system:dept:list')")
    public String test() throws Exception {

        return loginService.login();
    }
}
